package com.baizhi.utils.spring;

import com.baizhi.utils.spring.bean.MyClassImpl;
import com.baizhi.utils.spring.bean.MyInterface;
import org.junit.Test;
import org.springframework.core.GenericTypeResolver;

public class GenericTypeResolverTest {

    /**
     * 泛型类型解析
     */
    @Test
    public void test1() {
        MyClassImpl test = new MyClassImpl();
        Class<?> aClass = GenericTypeResolver.resolveTypeArgument(test.getClass(), MyInterface.class);
        System.out.println(aClass);
    }
}
